﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MaterialSkin;
using MaterialSkin.Controls;

namespace QDSpider
{
    public class BaseForm:MaterialForm
    {
        protected TextBoxBase TxtMsg;

        private delegate void AppendMsgDelegate(string msg);

        protected void AppendMsg(string msg)
        {
            if (TxtMsg.InvokeRequired)
            {
                var am = new AppendMsgDelegate(AppendMsg);
                TxtMsg.Invoke(am);
            }
            else
            {
                TxtMsg.AppendText(msg+Environment.NewLine);
                TxtMsg.ScrollToCaret();
            }
        }

        protected BaseForm()
        {
            
        }
    }
}
